﻿using MediatR;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OrderModule.Infrastructure
{
    public class OrderModuleDbContext : DDD.EFCore.EFContext<OrderModuleDbContext>
    {
        public OrderModuleDbContext(DbContextOptions<OrderModuleDbContext> options, IMediator mediator, IServiceProvider provider) 
            : base(options, mediator, provider)
        {
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            //modelBuilder.ApplyConfiguration(new OrderEntityTypeConfiguration());
            base.OnModelCreating(modelBuilder);
        }

        public DbSet<Domain.OrderAggregate.Order> Order { get; set; }
    }
}
